package org.cuit.lmq.domain.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import lombok.experimental.Accessors;
import org.cuit.lmq.constants.enums.TrainTypeEnum;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Seon
 * @since 2023-03-03
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_train_info")
public class TrainInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 本次训练时间
     */
    private Double trainTime;

    /**
     * 平均心率
     */
    private Double avgHeartRate;

    /**
     * 跑步距离，单位为m
     */
    private Double runDistance;

    /**
     * 跳绳个数，单位为次
     */
    private Integer skipNum;

    /**
     * 卡路里消耗,单位为卡路里
     */
    private Double calorieBrun;

    /**
     * 训练类型：跑步，跳绳，乒乓专项训练
     */
    private TrainTypeEnum trainType;
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date date;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
